<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>Form Wizard - Ace Admin</title>

		<meta name="description" content="and Validation" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<!--basic styles-->

		<link href="Public/Admin/css/bootstrap.min.css" rel="stylesheet" />
		<link href="Public/Admin/css/bootstrap-responsive.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="Public/Admin/css/font-awesome.min.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="Public/Admin/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!--page specific plugin styles-->

		<link rel="stylesheet" href="Public/Admin/css/select2.css" />

		<!--ace styles-->

		<link rel="stylesheet" href="Public/Admin/css/ace.min.css" />
		<link rel="stylesheet" href="Public/Admin/css/ace-responsive.min.css" />
		<link rel="stylesheet" href="Public/Admin/css/ace-skins.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="Public/Admin/css/ace-ie.min.css" />
		<![endif]-->

		<!--inline styles related to this page-->
	<style type="text/css">
		#add:hover td{
			background: #C4E3F3;
		}
		#add td{
			background: #C4E3F3;
			padding-top: 0px;
			padding-bottom: 0px;
			line-height: 40px;
		}
		#add td input,#add td select{
			margin-top: 5px;
			margin-bottom: 5px;
			width: auto;
			min-width: 150px;
		}
	</style>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
	
	
	<body>
		
		<div class="page-content">
			<div class="page-header position-relative">
				<h1>
					货品管理
					<small>
						<i class="icon-double-angle-right"></i>
						货品列表
					</small>
				</h1>
			</div><!--/.page-header-->
			<div class="row-fluid">
				<div class="span12">
					<!--PAGE CONTENT BEGINS-->

					<div class="row-fluid">
						<div class="span12">
							<table style="overflow: hidden;" id="sample-table-1" class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th class="center" width="80">
											<i class="icon-link"></i>
											货品ID
										</th>
										{{foreach from="$spec" value="$v"}}
										<th width="80">
											<i class="icon-leaf"></i>
											{{$v['atname']}}
										</th>
										{{endforeach}}
										
										<th width="80" class=""  >
											<i class="icon-truck"></i>
											库存
										</th>
										<th width="80" class=""  >
											<i class="icon-list-ol"></i>
											货号
										</th>

										<th style="width: 150px;">
											<i class="icon-wrench"></i>
											分类操作
										</th>
									</tr>
								</thead>

								<tbody>
									{{foreach from="$glData" value="$v"}}
									<tr>
										<td class="center">
											{{$v['glid']}}
										</td>
										{{foreach from="$v['comb']" value="$vv"}}
										<td >
											{{$vv}}
										</td>
										{{endforeach}}
										<td class="">{{$v['inventory']}}</td>
										<td class="">{{$v['itemno']}}</td>
										<td>
											<div class="btn-group">
												
												<a href="{{U('Glist/edit',array('glid'=>$v['glid'],'gid'=>$v['goods_gid']))}}" class="btn btn-mini btn-info">
													<i class="icon-edit bigger-120"></i>修改
												</a>

												<a href="javascript: if(confirm('您确定删除吗？')) location.href='{{U('Glist/del',array('glid'=>$v['glid'],'gid'=>$v['goods_gid']))}}'" class="btn btn-mini btn-danger">
													<i class="icon-trash bigger-120"></i>删除
												</a>
											</div>

										</td>
									</tr>
									
									{{endforeach}}
									
									
									<tr id="add">
										<form action="" method="post">
										
										<td class="center">
											添加货品
										</td>
								
								
								
										{{foreach from="$spec" value="$v"}}
										<td >
											<select name="combine[]">
												{{foreach from="$v['gavalue']" key="$kk" value="$vv"}}
												<option value="{{$v['gaid'][$kk]}}">{{$vv}}</option>
												{{endforeach}}
											</select>
										</td>
										{{endforeach}}
										
										
										
										
										
										<td class="">
											<input type="text" name="inventory" id="" value="0" />
										</td>
										<td class="">
											<input type="text" name="itemno" id="" value="{{$itemno}}" placeholder="货号只能是数字或字母" />
										</td>
										<td>
											<div class="btn-group">
												<input type="hidden" name="goods_gid" id="" value="{{Q('get.gid')}}" />
												<button type="submit" class="btn btn-mini btn-success"><i class="icon-ok bigger-120"></i>添加</button>
												<button type="reset" class="btn btn-mini btn-danger"><i class="icon-undo bigger-120"></i>取消</button>
											</div>

										</td>
										
										</form>
									</tr>
								</tbody>
							</table>
							<h3>Tips:</h3>
							<p>1.库存为不小于0的数字。</p>
							<p>2.货号由12位的数字或字母组成的具有唯一性的字符串，默认随机生成。</p>
							<p>3.相同规格组合只能添加一次。</p>
						</div>
					</div>
		</div><!--/.page-content-->

	</div><!--/.main-content-->
</div><!--/.main-container-->

	</body>
</html>
